<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:dt="http://java.sun.com/jsf/composite/components"
                xmlns:p="http://primefaces.org/ui"
                template="./template2.xhtml">
    
    <ui:define name="mainContent">
        <h2>#{leagueBean.activeTeam}</h2>
        <a class="fancy" href="history.xhtml">#{leagueBean.activeTeamWinHistory}</a>
        <h5 class="fancy">Week #{leagueBean.currentWeek}: <p:commandLink value="Facing #{leagueBean.activeTeamFacing}" action="#{leagueBean.teamRedirect()}">
        <f:setPropertyActionListener target="#{leagueBean.activeTeam}" value="#{team}" />
        </p:commandLink></h5>
        <h5 class="fancy">#{leagueBean.activeTeamPoints}</h5>
        <div class="inset">
                <!-- a href="#"><h4> Download Now!</h4></a -->	
                <h4 class="fancy">Active Players</h4>
                <div class="inset">
                        <h:panelGrid id="table" >
                        <table width="700" border="0" cellspacing="1" table-layout="fixed">
                        <tr bgcolor="#0084d1" class="fancy"> <td>Position</td> <td>Name</td> <td>Opposing</td> <td>Game score</td>
                                <td>Fantasy points</td></tr>
                                <ui:repeat value="#{teamBean.players}" var="player" >
                                    <tr bgcolor="#83caff"> <td><p:commandLink action="#{leagueBean.teamRedirect()}" value="#{player.position}" update=":table,:bench" /></td> <td><p:commandLink action="#{leagueBean.teamRedirect()}" value="#{player.name}" update=":table,:bench" /></td> <td><p:commandLink action="#{leagueBean.teamRedirect()}" value="#{player.opposing}" update=":table,:bench" /></td> <td><p:commandLink action="#{leagueBean.teamRedirect()}" value="#{player.gameScore}" update=":table,:bench" /></td> 
                                <td><p:commandLink action="#{leagueBean.teamRedirect()}" value="#{player.fantasyPoints}" update=":table,:bench" /></td></tr>
                                </ui:repeat>
                        </table></h:panelGrid></div>
                </div>
 
                <h4 class="fancy">Bench</h4>
                <div class="inset">
                <h:panelGrid id="bench" >
                        <table width="700" border="0" cellspacing="1" table-layout="fixed">
                        <tr bgcolor="#0084d1" class="fancy"> <td>Position</td> <td>Name</td> <td>Opposing</td> <td>Game score</td>
                                <td>Fantasy points</td></tr>
                                <ui:repeat value="#{teamBean.players}" var="player" >
                                    <tr bgcolor="#83caff"> <td><p:commandLink action="#{leagueBean.teamRedirect()}" value="#{player.position}" update=":table,:bench" /></td> <td><p:commandLink action="#{leagueBean.teamRedirect()}" value="#{player.name}" update=":table,:bench" /></td> <td><p:commandLink action="#{leagueBean.teamRedirect()}" value="#{player.opposing}" update=":table,:bench" /></td> <td><p:commandLink action="#{leagueBean.teamRedirect()}" value="#{player.gameScore}" update=":table,:bench" /></td> 
                                <td><p:commandLink action="#{leagueBean.teamRedirect()}" value="#{player.fantasyPoints}" update=":table,:bench" /></td></tr>
                                </ui:repeat>
                        </table></h:panelGrid></div>
    </ui:define>
    
</ui:composition>
